package com.cloudpolice.door.feignInterface.hystric;

import com.cloudpolice.door.feignInterface.EquipmentMessageInterFace;
import lh.model.ResultVO;
import lh.model.ResultVOPage;
import lh.units.ResultStruct;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;

/**
 * @author ：梁昊，后端工程师：flyman5，前端工程师：孙耀
 * @create 2020-04-01 22:33
 * @function
 * @editLog
 */
@Service
public class EquipmentMessageInterFaceHystric implements EquipmentMessageInterFace {
    private final String hystricMessage = "亲，服务器正忙，请稍后再戳。";
    @Override
    public ResultVO selectEquipmentMessageById(@RequestParam(value = "id") String id) {
        return ResultStruct.error(hystricMessage, ResultVO.class, null);
    }
    @Override
    public ResultVOPage selectEquipmentMessageByCom(@RequestParam(value = "id", required = false) String id
            , @RequestParam(value = "communityId") String communityId
            , @RequestParam(value = "periodId", required = false) String periodId
            , @RequestParam(value = "page", defaultValue = "1") int page
            , @RequestParam(value = "limit", defaultValue = "10") int limit) {
        return ResultStruct.error(hystricMessage, ResultVOPage.class, null);
    }


    @Override
    public int updateEquipmentMessage(@RequestParam(value = "id") String id
            , @RequestParam(value = "communityId", required = false) String communityId
            , @RequestParam(value = "periodId", required = false) String periodId
            , @RequestParam(value = "message", required = false) String message
            , @RequestParam(value = "messageType", required = false) int messageType
            , @RequestParam(value = "createName", required = false) String createName
            , @RequestParam(value = "createTime", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") Date createTime
            , @RequestParam(value = "audioSign", required = false) boolean audioSign
            , @RequestParam(value = "sortNo", required = false) int sortNo
            , @RequestParam(value = "beginDate", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginDate
            , @RequestParam(value = "endDate", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate
            , @RequestParam(value = "colorR", defaultValue = "-1") int colorR
            , @RequestParam(value = "colorG", defaultValue = "-1") int colorG
            , @RequestParam(value = "colorB", defaultValue = "-1") int colorB
            , @RequestParam(value = "fontSize", defaultValue = "-1") int fontSize
    ){
        return 0;
    }

    @Override
    public int deleteEquipmentMessage(@RequestParam(value = "id", required = false) String id) {
        return 0;
    }

    @Override
    public int insertEquipmentMessage(@RequestParam(value = "communityId", required = false) String communityId
            , @RequestParam(value = "periodId", required = false) String periodId
            , @RequestParam(value = "message", required = false) String message
            , @RequestParam(value = "messageType", required = false) int messageType
            , @RequestParam(value = "createName", required = false) String createName
            , @RequestParam(value = "createTime", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") Date createTime
            , @RequestParam(value = "audioSign", required = false, defaultValue = "1") boolean audioSign
            , @RequestParam(value = "sortNo", required = false) int sortNo
            , @RequestParam(value = "beginDate", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginDate
            , @RequestParam(value = "endDate", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate
            , @RequestParam(value = "colorR", defaultValue = "-1") int colorR
            , @RequestParam(value = "colorG", defaultValue = "-1") int colorG
            , @RequestParam(value = "colorB", defaultValue = "-1") int colorB
            , @RequestParam(value = "fontSize", defaultValue = "-1") int fontSize
    ) {
        return 0;
    }

    @Override
    public ResultVO selectEquipmentMessageBySn(@RequestParam(value = "communityId") String communityId
            , @RequestParam(value = "periodId") String periodId) {
        return ResultStruct.error(hystricMessage, ResultVO.class, null);
    }
}
